<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>YmsgIRC: IrcCommand Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">YmsgIRC
   </div>
   <div id="projectbrief">Program enabling YMSG clients to use IRC</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_irc_command.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">IrcCommand Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Internet Relay Chat command class.  
 <a href="class_irc_command.html#details">More...</a></p>

<p><code>#include &lt;IRC.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a419b179170e745045b1fcadcc2661aa0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#a419b179170e745045b1fcadcc2661aa0">init</a> (int mode=0)</td></tr>
<tr class="memdesc:a419b179170e745045b1fcadcc2661aa0"><td class="mdescLeft">&#160;</td><td class="mdescRight">clears property values  <a href="#a419b179170e745045b1fcadcc2661aa0"></a><br/></td></tr>
<tr class="memitem:a8f97f56a428f86060a086f24c823a043"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#a8f97f56a428f86060a086f24c823a043">IrcCommand</a> ()</td></tr>
<tr class="memdesc:a8f97f56a428f86060a086f24c823a043"><td class="mdescLeft">&#160;</td><td class="mdescRight">creates an empty <a class="el" href="class_irc_command.html" title="Internet Relay Chat command class.">IrcCommand</a> object  <a href="#a8f97f56a428f86060a086f24c823a043"></a><br/></td></tr>
<tr class="memitem:aebc4b87946ed8b775ebff2ff3ea3d94b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#aebc4b87946ed8b775ebff2ff3ea3d94b">IrcCommand</a> (const string &amp;command)</td></tr>
<tr class="memdesc:aebc4b87946ed8b775ebff2ff3ea3d94b"><td class="mdescLeft">&#160;</td><td class="mdescRight">creates an <a class="el" href="class_irc_command.html" title="Internet Relay Chat command class.">IrcCommand</a> object from a command string  <a href="#aebc4b87946ed8b775ebff2ff3ea3d94b"></a><br/></td></tr>
<tr class="memitem:a36436384c6dd29783e0a7d4c519897d1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#a36436384c6dd29783e0a7d4c519897d1">IrcCommand</a> (const string &amp;src, const string &amp;dst, const string &amp;typ, const string &amp;cont, bool singlecont=false, bool incOrig=false)</td></tr>
<tr class="memdesc:a36436384c6dd29783e0a7d4c519897d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">creates an <a class="el" href="class_irc_command.html" title="Internet Relay Chat command class.">IrcCommand</a> object from a command fields  <a href="#a36436384c6dd29783e0a7d4c519897d1"></a><br/></td></tr>
<tr class="memitem:a1afe2fc83b2952ee655f1620cca52cc2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#a1afe2fc83b2952ee655f1620cca52cc2">shortorigin</a> ()</td></tr>
<tr class="memdesc:a1afe2fc83b2952ee655f1620cca52cc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortens the origin string to just the nickname.  <a href="#a1afe2fc83b2952ee655f1620cca52cc2"></a><br/></td></tr>
<tr class="memitem:ac73b50bc6a6ee86aa7ef76da92e1be04"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04">process</a> ()</td></tr>
<tr class="memdesc:ac73b50bc6a6ee86aa7ef76da92e1be04"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processes a raw command string into data fields.  <a href="#ac73b50bc6a6ee86aa7ef76da92e1be04"></a><br/></td></tr>
<tr class="memitem:a393997bb863f686ec233ce1570e6ed3b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#a393997bb863f686ec233ce1570e6ed3b">assemble</a> (bool client=true)</td></tr>
<tr class="memdesc:a393997bb863f686ec233ce1570e6ed3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a command string from data fields.  <a href="#a393997bb863f686ec233ce1570e6ed3b"></a><br/></td></tr>
<tr class="memitem:a7ff3443008f6d7fcb1c46208e7d3874e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ff3443008f6d7fcb1c46208e7d3874e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>debug</b> ()</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a5462669a6f8954b02ae86a573446f741"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#a5462669a6f8954b02ae86a573446f741">single_incOrigin</a></td></tr>
<tr class="memdesc:a5462669a6f8954b02ae86a573446f741"><td class="mdescLeft">&#160;</td><td class="mdescRight">specifies if an Origin field is included in the command after the type field (MISNAMED)  <a href="#a5462669a6f8954b02ae86a573446f741"></a><br/></td></tr>
<tr class="memitem:a241ae2ec2b4399fc161b99684e59d184"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a241ae2ec2b4399fc161b99684e59d184"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#a241ae2ec2b4399fc161b99684e59d184">singlecontent</a></td></tr>
<tr class="memdesc:a241ae2ec2b4399fc161b99684e59d184"><td class="mdescLeft">&#160;</td><td class="mdescRight">specifies if the <a class="el" href="class_i_r_c.html" title="Internet Relay Chat network class.">IRC</a> command has a single string-content area <br/></td></tr>
<tr class="memitem:ae8c5eafedd90ba1a1adbcf90471bb45f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae8c5eafedd90ba1a1adbcf90471bb45f"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#ae8c5eafedd90ba1a1adbcf90471bb45f">str</a></td></tr>
<tr class="memdesc:ae8c5eafedd90ba1a1adbcf90471bb45f"><td class="mdescLeft">&#160;</td><td class="mdescRight">a raw/assembled <a class="el" href="class_i_r_c.html" title="Internet Relay Chat network class.">IRC</a> command string <br/></td></tr>
<tr class="memitem:a8c85f1b34ba11dfc0001fdef7345af7f"><td class="memItemLeft" align="right" valign="top">vector&lt; string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_irc_command.html#a8c85f1b34ba11dfc0001fdef7345af7f">parts</a></td></tr>
<tr class="memitem:gaf59bb7b0fa25406a93bb4b82b0479073"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf59bb7b0fa25406a93bb4b82b0479073"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__irccmdfields.html#gaf59bb7b0fa25406a93bb4b82b0479073">type</a></td></tr>
<tr class="memdesc:gaf59bb7b0fa25406a93bb4b82b0479073"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of command (QUIT/JOIN/001) <br/></td></tr>
<tr class="memitem:ga686fcc563a3e419eeb74881a440a59c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga686fcc563a3e419eeb74881a440a59c1"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__irccmdfields.html#ga686fcc563a3e419eeb74881a440a59c1">origin</a></td></tr>
<tr class="memdesc:ga686fcc563a3e419eeb74881a440a59c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The origin field of the command (if any) - nickname or server. <br/></td></tr>
<tr class="memitem:gab800c65d21057f24af790ebe5314c63c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab800c65d21057f24af790ebe5314c63c"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__irccmdfields.html#gab800c65d21057f24af790ebe5314c63c">destination</a></td></tr>
<tr class="memdesc:gab800c65d21057f24af790ebe5314c63c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The destination field of the command (if any) - nickname or channel. <br/></td></tr>
<tr class="memitem:gab1c6e927e23c185d23a34ca14017b173"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab1c6e927e23c185d23a34ca14017b173"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__irccmdfields.html#gab1c6e927e23c185d23a34ca14017b173">content</a></td></tr>
<tr class="memdesc:gab1c6e927e23c185d23a34ca14017b173"><td class="mdescLeft">&#160;</td><td class="mdescRight">The contents of the command, possibly including multiple other fields. <br/></td></tr>
<tr class="memitem:gaa32fb7ed30c6cd60f8726936681bbdd0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa32fb7ed30c6cd60f8726936681bbdd0"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__irccmdfields.html#gaa32fb7ed30c6cd60f8726936681bbdd0">subcontent</a></td></tr>
<tr class="memdesc:gaa32fb7ed30c6cd60f8726936681bbdd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The contents of the command, excluding one field from the beginning. <br/></td></tr>
<tr class="memitem:ga1e6e2d7e5f6ad90e56f777614549845d"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__irccmdfields.html#ga1e6e2d7e5f6ad90e56f777614549845d">text</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Internet Relay Chat command class. </p>
<p>provides methods and information for constructing, manipulating and getting information from <a class="el" href="class_i_r_c.html" title="Internet Relay Chat network class.">IRC</a> commands.</p>
<p>In processing, the original command string is separated into different fields and representations of data. <br/>
 See <a class="el" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04" title="Processes a raw command string into data fields.">IrcCommand::process()</a> for more information.</p>
<p>In assembling, several fields of data are used to construct a command string. <br/>
 See <a class="el" href="class_irc_command.html#a393997bb863f686ec233ce1570e6ed3b" title="Constructs a command string from data fields.">IrcCommand::assemble()</a> for more information. </p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__irccmdfields.html">Command property fields</a> </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8f97f56a428f86060a086f24c823a043"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IrcCommand::IrcCommand </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>creates an empty <a class="el" href="class_irc_command.html" title="Internet Relay Chat command class.">IrcCommand</a> object </p>
<p>calls <a class="el" href="class_irc_command.html#a419b179170e745045b1fcadcc2661aa0" title="clears property values">init()</a>, enables SingleContent mode, disables IncludeOrigin mode. </p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="class_irc_command.html#a241ae2ec2b4399fc161b99684e59d184" title="specifies if the IRC command has a single string-content area">singlecontent</a> </dd>
<dd>
<a class="el" href="class_irc_command.html#a5462669a6f8954b02ae86a573446f741" title="specifies if an Origin field is included in the command after the type field (MISNAMED)">single_incOrigin</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_a8f97f56a428f86060a086f24c823a043_cgraph.jpg" border="0" usemap="#class_irc_command_a8f97f56a428f86060a086f24c823a043_cgraph" alt=""/></div>
<map name="class_irc_command_a8f97f56a428f86060a086f24c823a043_cgraph" id="class_irc_command_a8f97f56a428f86060a086f24c823a043_cgraph">
<area shape="rect" id="node3" href="class_irc_command.html#a419b179170e745045b1fcadcc2661aa0" title="clears property values" alt="" coords="229,5,349,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_a8f97f56a428f86060a086f24c823a043_icgraph.jpg" border="0" usemap="#class_irc_command_a8f97f56a428f86060a086f24c823a043_icgraph" alt=""/></div>
<map name="class_irc_command_a8f97f56a428f86060a086f24c823a043_icgraph" id="class_irc_command_a8f97f56a428f86060a086f24c823a043_icgraph">
<area shape="rect" id="node3" href="class_i_r_c.html#a5257f82cd28441805a6478d448040bdf" title="processes a received command" alt="" coords="229,5,357,32"/><area shape="rect" id="node5" href="class_i_r_c.html#aa8f82a2cd2ec8f9210174f70830f9d75" title="reads a queue for Action&#45;messages the program told this object to perform, and carries one of them ou..." alt="" coords="233,56,353,83"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aebc4b87946ed8b775ebff2ff3ea3d94b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IrcCommand::IrcCommand </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>command</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>creates an <a class="el" href="class_irc_command.html" title="Internet Relay Chat command class.">IrcCommand</a> object from a command string </p>
<p>assigns <a class="el" href="class_irc_command.html#ae8c5eafedd90ba1a1adbcf90471bb45f" title="a raw/assembled IRC command string">IrcCommand::str</a> to the input string and calls <a class="el" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04" title="Processes a raw command string into data fields.">IrcCommand::process()</a> </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">command</td><td>raw command string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04" title="Processes a raw command string into data fields.">process()</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_aebc4b87946ed8b775ebff2ff3ea3d94b_cgraph.jpg" border="0" usemap="#class_irc_command_aebc4b87946ed8b775ebff2ff3ea3d94b_cgraph" alt=""/></div>
<map name="class_irc_command_aebc4b87946ed8b775ebff2ff3ea3d94b_cgraph" id="class_irc_command_aebc4b87946ed8b775ebff2ff3ea3d94b_cgraph">
<area shape="rect" id="node3" href="class_irc_command.html#a419b179170e745045b1fcadcc2661aa0" title="clears property values" alt="" coords="427,5,547,32"/><area shape="rect" id="node5" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04" title="Processes a raw command string into data fields." alt="" coords="229,31,379,57"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a36436384c6dd29783e0a7d4c519897d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IrcCommand::IrcCommand </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>typ</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>cont</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>singlecont</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>incOrig</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>creates an <a class="el" href="class_irc_command.html" title="Internet Relay Chat command class.">IrcCommand</a> object from a command fields </p>
<p>this function assigns the similarly-named properties to the inputs, and then calls IrcCommand::assemble(true) </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>origin/sender nickname or server </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst</td><td>destination nickname or channel </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">typ</td><td>type of command (PING/QUIT/001) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cont</td><td>content section of the command (see <a class="el" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04" title="Processes a raw command string into data fields.">process()</a> for elaboration ) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">singlecont</td><td>specifies whether the command content is a single text field (see <a class="el" href="class_irc_command.html#a393997bb863f686ec233ce1570e6ed3b" title="Constructs a command string from data fields.">assemble()</a> ) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">incOrig</td><td>specifies wherther the origin is to be included after the Type (see <a class="el" href="class_irc_command.html#a393997bb863f686ec233ce1570e6ed3b" title="Constructs a command string from data fields.">assemble()</a> ) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="class_irc_command.html#a393997bb863f686ec233ce1570e6ed3b" title="Constructs a command string from data fields.">assemble()</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_a36436384c6dd29783e0a7d4c519897d1_cgraph.jpg" border="0" usemap="#class_irc_command_a36436384c6dd29783e0a7d4c519897d1_cgraph" alt=""/></div>
<map name="class_irc_command_a36436384c6dd29783e0a7d4c519897d1_cgraph" id="class_irc_command_a36436384c6dd29783e0a7d4c519897d1_cgraph">
<area shape="rect" id="node3" href="class_irc_command.html#a419b179170e745045b1fcadcc2661aa0" title="clears property values" alt="" coords="437,23,557,50"/><area shape="rect" id="node5" href="class_irc_command.html#a393997bb863f686ec233ce1570e6ed3b" title="Constructs a command string from data fields." alt="" coords="230,23,389,50"/><area shape="rect" id="node7" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04" title="Processes a raw command string into data fields." alt="" coords="235,74,384,100"/></map>
</div>
</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a393997bb863f686ec233ce1570e6ed3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IrcCommand::assemble </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>client</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructs a command string from data fields. </p>
<p>In assembling, several fields of data are used to construct a command string. <br/>
 See <a class="el" href="class_irc_command.html#a393997bb863f686ec233ce1570e6ed3b" title="Constructs a command string from data fields.">IrcCommand::assemble()</a> for more information. In single-content mode: only Type, Destination, Text fields are used to assemble a command.<br/>
 In multi-content mode: only Type, Content are used. <br/>
 In multi-content/Include-Origin mode: Type, Origin, Content are used. <br/>
 This function only modifies the <a class="el" href="class_irc_command.html#ae8c5eafedd90ba1a1adbcf90471bb45f" title="a raw/assembled IRC command string">IrcCommand::str</a> property. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>Specifies if a command is constructed coming-from an <a class="el" href="class_i_r_c.html" title="Internet Relay Chat network class.">IRC</a> client. This disables origin-prefixing. (default true) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>none </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__irccmdfields.html">Command property fields</a> </dd>
<dd>
<a class="el" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04" title="Processes a raw command string into data fields.">process</a> </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_a393997bb863f686ec233ce1570e6ed3b_icgraph.jpg" border="0" usemap="#class_irc_command_a393997bb863f686ec233ce1570e6ed3b_icgraph" alt=""/></div>
<map name="class_irc_command_a393997bb863f686ec233ce1570e6ed3b_icgraph" id="class_irc_command_a393997bb863f686ec233ce1570e6ed3b_icgraph">
<area shape="rect" id="node3" href="class_irc_command.html#a36436384c6dd29783e0a7d4c519897d1" title="creates an IrcCommand object from a command fields" alt="" coords="213,5,389,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a419b179170e745045b1fcadcc2661aa0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IrcCommand::init </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>clears property values </p>
<p>conditionally resets/clears property values of the class. (no arbitrary defaults, just "") </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>Specifies what to clear: <table class="doxtable">
<tr>
<th>Value </th><th>Behavior</th></tr>
<tr>
<td>0 (default) </td><td>clears str, parts and command fields </td></tr>
<tr>
<td>1 </td><td>clears str </td></tr>
<tr>
<td>2 </td><td>clears parts and command fields </td></tr>
</table>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="class_irc_command.html#ae8c5eafedd90ba1a1adbcf90471bb45f" title="a raw/assembled IRC command string">str</a> </dd>
<dd>
<a class="el" href="class_irc_command.html#a8c85f1b34ba11dfc0001fdef7345af7f">parts</a> </dd>
<dd>
<a class="el" href="group__irccmdfields.html">Command property fields</a> </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_a419b179170e745045b1fcadcc2661aa0_icgraph.jpg" border="0" usemap="#class_irc_command_a419b179170e745045b1fcadcc2661aa0_icgraph" alt=""/></div>
<map name="class_irc_command_a419b179170e745045b1fcadcc2661aa0_icgraph" id="class_irc_command_a419b179170e745045b1fcadcc2661aa0_icgraph">
<area shape="rect" id="node3" href="class_irc_command.html#ac73b50bc6a6ee86aa7ef76da92e1be04" title="Processes a raw command string into data fields." alt="" coords="187,5,336,32"/><area shape="rect" id="node7" href="class_irc_command.html#a8f97f56a428f86060a086f24c823a043" title="creates an empty IrcCommand object" alt="" coords="173,56,349,83"/><area shape="rect" id="node5" href="class_irc_command.html#aebc4b87946ed8b775ebff2ff3ea3d94b" title="creates an IrcCommand object from a command string" alt="" coords="397,5,573,32"/><area shape="rect" id="node9" href="class_i_r_c.html#a5257f82cd28441805a6478d448040bdf" title="processes a received command" alt="" coords="421,56,549,83"/><area shape="rect" id="node11" href="class_i_r_c.html#aa8f82a2cd2ec8f9210174f70830f9d75" title="reads a queue for Action&#45;messages the program told this object to perform, and carries one of them ou..." alt="" coords="425,107,545,133"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ac73b50bc6a6ee86aa7ef76da92e1be04"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IrcCommand::process </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Processes a raw command string into data fields. </p>
<p>In processing, the original command string is separated into different fields and representations of data. <br/>
 Commands are broken down in the following way: </p>
<div class="fragment"><div class="line">Fictional example command                                           | Properties    |  Example value</div>
<div class="line">------------------------------------------------------------------- | ------------- | ----------------------</div>
<div class="line">Jim512 PING Elizabeth27 something something :something with spaces  |               | </div>
<div class="line">|----------------------------------------------------------------|  | <a class="code" href="class_irc_command.html#ae8c5eafedd90ba1a1adbcf90471bb45f" title="a raw/assembled IRC command string">str</a>           | (too <span class="keywordtype">long</span> to display)</div>
<div class="line">|----| |--| |---------| |-------| |-------| |--------------------|  | <a class="code" href="class_irc_command.html#a8c85f1b34ba11dfc0001fdef7345af7f">parts</a>         | (vector of strings)</div>
<div class="line">|----|                                                              | <a class="code" href="group__irccmdfields.html#ga686fcc563a3e419eeb74881a440a59c1" title="The origin field of the command (if any) - nickname or server.">origin</a>        | Jim512 </div>
<div class="line">       |--|                                                         | <a class="code" href="group__irccmdfields.html#gaf59bb7b0fa25406a93bb4b82b0479073" title="The type of command (QUIT/JOIN/001)">type</a>          | PING</div>
<div class="line">            |---------|                                             | <a class="code" href="group__irccmdfields.html#gab800c65d21057f24af790ebe5314c63c" title="The destination field of the command (if any) - nickname or channel.">destination</a>   | Elizabeth27</div>
<div class="line">            |-----------------------------------------------------| | <a class="code" href="group__irccmdfields.html#gab1c6e927e23c185d23a34ca14017b173" title="The contents of the command, possibly including multiple other fields.">content</a>       | (too <span class="keywordtype">long</span> to display)</div>
<div class="line">                        |-----------------------------------------| | <a class="code" href="group__irccmdfields.html#gaa32fb7ed30c6cd60f8726936681bbdd0" title="The contents of the command, excluding one field from the beginning.">subcontent</a>    | (too <span class="keywordtype">long</span> to display)</div>
<div class="line">                                             |-------------------|  | <a class="code" href="group__irccmdfields.html#ga1e6e2d7e5f6ad90e56f777614549845d">text</a>          | something with spaces</div>
</div><!-- fragment --><p> This function only modifies internal properties as shown above. </p>
<dl class="section return"><dt>Returns:</dt><dd>none </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__irccmdfields.html">Command property fields</a> </dd>
<dd>
<a class="el" href="class_irc_command.html#a393997bb863f686ec233ce1570e6ed3b" title="Constructs a command string from data fields.">assemble()</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_ac73b50bc6a6ee86aa7ef76da92e1be04_cgraph.jpg" border="0" usemap="#class_irc_command_ac73b50bc6a6ee86aa7ef76da92e1be04_cgraph" alt=""/></div>
<map name="class_irc_command_ac73b50bc6a6ee86aa7ef76da92e1be04_cgraph" id="class_irc_command_ac73b50bc6a6ee86aa7ef76da92e1be04_cgraph">
<area shape="rect" id="node3" href="class_irc_command.html#a419b179170e745045b1fcadcc2661aa0" title="clears property values" alt="" coords="203,5,323,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_ac73b50bc6a6ee86aa7ef76da92e1be04_icgraph.jpg" border="0" usemap="#class_irc_command_ac73b50bc6a6ee86aa7ef76da92e1be04_icgraph" alt=""/></div>
<map name="class_irc_command_ac73b50bc6a6ee86aa7ef76da92e1be04_icgraph" id="class_irc_command_ac73b50bc6a6ee86aa7ef76da92e1be04_icgraph">
<area shape="rect" id="node3" href="class_irc_command.html#aebc4b87946ed8b775ebff2ff3ea3d94b" title="creates an IrcCommand object from a command string" alt="" coords="203,5,379,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a1afe2fc83b2952ee655f1620cca52cc2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IrcCommand::shortorigin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Shortens the origin string to just the nickname. </p>
<p>This function changes origins like nickname!user to just <code>nickname</code>. This function only changes the <a class="el" href="group__irccmdfields.html#ga686fcc563a3e419eeb74881a440a59c1" title="The origin field of the command (if any) - nickname or server.">IrcCommand::origin</a> property. </p>
<dl class="section return"><dt>Returns:</dt><dd>none </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__irccmdfields.html#ga686fcc563a3e419eeb74881a440a59c1" title="The origin field of the command (if any) - nickname or server.">origin</a> </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_irc_command_a1afe2fc83b2952ee655f1620cca52cc2_icgraph.jpg" border="0" usemap="#class_irc_command_a1afe2fc83b2952ee655f1620cca52cc2_icgraph" alt=""/></div>
<map name="class_irc_command_a1afe2fc83b2952ee655f1620cca52cc2_icgraph" id="class_irc_command_a1afe2fc83b2952ee655f1620cca52cc2_icgraph">
<area shape="rect" id="node3" href="class_i_r_c.html#a5257f82cd28441805a6478d448040bdf" title="processes a received command" alt="" coords="216,5,344,32"/></map>
</div>
</p>

</div>
</div>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="a8c85f1b34ba11dfc0001fdef7345af7f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;string&gt; IrcCommand::parts</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>substring parts of an <a class="el" href="class_i_r_c.html" title="Internet Relay Chat network class.">IRC</a> command </p>

</div>
</div>
<a class="anchor" id="a5462669a6f8954b02ae86a573446f741"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IrcCommand::single_incOrigin</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>specifies if an Origin field is included in the command after the type field (MISNAMED) </p>
<p>this property is currently misnamed as it adds the origin when used in multi-content only. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>this property is likely to be renamed in the future </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_i_r_c_8h.html">IRC.h</a></li>
<li>IRC.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_irc_command.html">IrcCommand</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1 </li>
  </ul>
</div>
</body>
</html>
